
#include "BinaryTree.h"

int main(int argc, char* argv[])
{
    cout<<"BinarySearchTree测试：" << endl;
    BinarySearchTree<int> S1;
    S1.insert(9);
    S1.insert(8);
    S1.insert(7);
    S1.printTree();
    S1.remove(9);
    S1.printTree();
    S1.remove(8);
    S1.printTree();
    S1.remove(7);
    S1.printTree();

    cout << "AvlTree测试：" << endl;
    AvlTree<double> S2;
    S2.insert(1.1);
    S2.insert(2.2);
    S2.insert(3.3);
    S2.printTree();
    S2.remove(1.1);
    S2.printTree();
    S2.remove(2.2);
    S2.printTree();
    S2.remove(3.3);
    S2.printTree();

    cout << "SplayTree测试：" << endl;
    SplayTree<double> S3;
    S3.insert(1.1);
    S3.insert(2.2);
    S3.insert(3.3);
    S3.printTree();
    S3.remove(1.1);
    S3.printTree();
    S3.remove(2.2);
    S3.printTree();
    S3.remove(3.3);
    S3.printTree();

 

    return 0;
};